<?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

namespace app\assets;

use yii\web\AssetManager;
use Yii;
/**
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @since 2.0
 */
class AdminAssetManager extends AssetManager
{
    protected function hash($path)
    {
        if (is_callable($this->hashCallback)) {
            return call_user_func($this->hashCallback, $path);
        }
        //dan，这里用了时间，我把时间去掉了，为了负载均衡
        $path = (is_file($path) ? dirname($path) : $path) ;//. filemtime($path)
        return sprintf('%x', crc32($path . Yii::getVersion() . '|' . $this->linkAssets));
    }
}